{if !$hide}
<center>
<form method='post' action='adm_classifieds_list.php'>
<select name='ad_cat_id'><option></option>{$catlist}</select>
&nbsp;<input type='text' name='find' value='{$find}'>
&nbsp;&nbsp;<input type='submit' value='{$smarty.const.LA_ADMIN_GET_ADS}' /></form>
</center>
{/if}

{if $num_ads} <center>{$num_ads} {$smarty.const.ads}</center> {/if}

<p><center>{$msg}</center></p>


<p>{$url_bar}</p>

{if !$hide}
<table border='0' cellspacing='0' width='100%' class="box" style="clear:both;">
<tr>
	<th width="30%"><a class='navlink' href='?orderby=ad_title&orderway=asc{$url_heading}'  title='{$smarty.const.LA_ADMIN_SORT_BY} {$smarty.const.LA_ADMIN_ADS_TITLE}'>{$smarty.const.LA_ADMIN_ADS_TITLE}</a></th>
	<th width="25%"><a class='navlink' href='?orderby=cat_name&orderway=asc{$url_heading}'  title='{$smarty.const.LA_ADMIN_SORT_BY} {$smarty.const.LA_ADMIN_ADS_CATEGORY}'>{$smarty.const.LA_ADMIN_ADS_CATEGORY}</a></th>
	<th width="15%"><a class='navlink' href='?orderby=ad_date&orderway=desc{$url_heading}'  title='{$smarty.const.LA_ADMIN_SORT_BY} {$smarty.const.LA_ADMIN_DATE}'>{$smarty.const.LA_ADMIN_DATE}</a></th>
	<th width="22%"><a class='navlink' href='?orderby=user_name&orderway=asc{$url_heading}' title='{$smarty.const.LA_ADMIN_SORT_BY} {$smarty.const.LA_ADMIN_OWNER}'>{$smarty.const.LA_ADMIN_OWNER}</a></th>
	<th width="5%"> <a class='navlink' href='?orderby=ad_is_special&orderway=desc{$url_heading}' title='{$smarty.const.LA_ADMIN_SORT_BY} {$smarty.const.LA_ADMIN_BOLD_ADS}'>{$smarty.const.LA_ADMIN_BOLD_ADS_SHORT}</a>
		<a class='navlink' href='?orderby=ad_is_premium&orderway=desc{$url_heading}' title='{$smarty.const.LA_ADMIN_SORT_BY} {$smarty.const.LA_ADMIN_PREMIUM_ADS}'>{$smarty.const.LA_ADMIN_PREMIUM_ADS_SHORT}</a>

	</th>
</tr>

{foreach item=l from=$listArray}
{if $l.NB is even by 1}
	<tr class="alt">
{else}
	<tr>
{/if}
	<td class="pointer"><a href='../detail.php?id={$l.ad_id}&preview=1' target='new'>{$l.ad_title}</a></td>
	<td class="category"><a href='?ads_by_cat={$l.cat_id}{$url}' title='{$smarty.const.LA_ADMIN_SHOW_ADS_BY_THIS_CAT}'>{$l.cat_name}</a></td>
	<td>{$l.ad_date}</td>
	<td><a href='?ads_by_user={$l.user_id}{$url}' title='View ads by {$l.user_name}'>{$l.user_name}</a></td>
	<td>
		<table cellpadding="0" cellspacing="0" style="margin:0px">
		<tr>
		<td><a href='adm_item_admin.php?ad_id={$l.ad_id}{$url}' title="{$smarty.const.LA_ADMIN_EDIT_AD}"><img src='../layout_images/new/edit.gif' alt='{$smarty.const.LA_ADMIN_EDIT_AD}' border='0' /></a></td>
		<td>
	
		
		{if $l.ad_is_special}
			<a href='?make_special=2&edit_id={$l.ad_id}{$url_special}' title="{$smarty.const.LA_ADMIN_REMOVE_BOLD}"><img src='../layout_images/admin/text_bold.gif' alt='{$smarty.const.LA_ADMIN_REMOVE_BOLD}' border='0' /></a>
		{else}
			<a href='?make_special=1&edit_id={$l.ad_id}{$url_special}' title="{$smarty.const.LA_ADMIN_BOLD_ADS}"><img src='../layout_images/admin/text_unbold.gif' alt='{$smarty.const.LA_ADMIN_BOLD_ADS}' border='0' /></a>
		{/if}
		
		</td>
		<td>
		
		{if $l.ad_is_premium}
			<a href='?make_premium=2&edit_id={$l.ad_id}{$url_premium}' title="{$smarty.const.LA_ADMIN_REMOVE_PREM}"><img src='../layout_images/admin/premium.gif' alt='{$smarty.const.LA_ADMIN_REMOVE_PREM}' border='0' /></a>
		{else}
			<a href='?make_premium=1&edit_id={$l.ad_id}{$url_premium}' title="{$smarty.const.LA_ADMIN_PREMIUM_ADS}"><img src='../layout_images/admin/premium_not.gif' alt='{$smarty.const.LA_ADMIN_PREMIUM_ADS}' border='0' /></a>
		{/if}
		
		
		</td>
		<td><a href='?delete={$l.ad_id}&edit_title={$l.ad_title}{$url_delete}' title="{$smarty.const.LA_ADMIN_DEL_AD}"><img src='../layout_images/new/delete.gif' alt='{$smarty.const.LA_ADMIN_DEL_AD}' border='0' /></a></td>
		
		{if $set_ad_validation && !$l.ad_is_validated}
		<td><a href='?activate={$l.ad_id}{$url_approve}&validated=2&title={$l.ad_title}' title="{$smarty.const.LA_ADMIN_APP_AD}"><img src='../layout_images/admin/check.gif' alt='{$smarty.const.LA_ADMIN_APP_AD}' border='0' /></a></td>		
		{/if}
		
		</tr>
		</table>
	
	
	</td>
</tr>
{/foreach}

</table>


<p>{$url_bar}</p>
{/if}


{literal}
<script language="javascript">
<!--
content=document.getElementById("find");
if( content != null ){content.focus();}
-->
</script>
{/literal}